Frequency Offset Estimation Method For Average Consistency Clock Synchronization

ABSTRACT

The present invention relates to a frequency offset estimation method for average consensus-based clock synchronization, and belongs to the technical field of wireless sensor networks. According to the method, in combination with distributed one-way broadcast characteristics, solving of maximum likelihood estimation is converted into a linear optimization problem, and a relative frequency offset estimation value is obtained by adopting an iterative method. By applying the estimation value to the compensation of logic clock parameter between nodes, an effect of keeping logic clocks of network nodes consistent can be achieved. According to the present invention, distribution characteristics of communication time delay are fully considered, accurate relative frequency offset estimation can be implemented, so the synchronization precision of average consensus-based clock synchronization is effectively improved, the maximum likelihood estimation solving is performed by adopting the iterative method, an estimation algorithm is simplified, and storage overhead is reduced.

FIELD OF INVENTION

The present invention belongs to the technical field of wireless sensor network communications, and relates to a frequency offset estimation method in average consensus-based clock synchronization based on maximum likelihood estimation.

BACKGROUND ART OF THE INVENTION

Clock synchronization is a basic support technology for a wireless sensor network. Multiple applications and services, such as routing, dormant scheduling, data fusion, i.e. are operated on a basis of clock synchronization of nodes in the network. In recent years, a large number of researches have focused on solving a problem of clock synchronization in wireless sensor networks, among which the typical ones are RBS, TPSN, FTSP, and PBS protocols. These clock synchronization protocols are generally divided into two types: reference node-based clock synchronization protocol and distributed clock synchronization protocol. Compared with the reference node-based clock synchronization protocol, the distributed clock synchronization protocol has significant advantages of robustness, extensibility, etc. due to no need for any reference node. There into, consensus-based clock synchronization not only has the advantage of a distributed synchronization algorithm, but also can achieve high precision synchronization in the whole network.

In a communication process of a wireless sensor network, an occurrence of time delay is inevitable. The composition of the communication time delay may be divided into fixed time delay and random time delay, wherein the random time delay may be modeled as Gaussian distribution, exponential distribution, gamma distribution, etc. in different scenarios. However, in an early consensus-based synchronization protocol, it was assumed that information between nodes may arrive instantaneously, but the influence of time delay is ignored. If communication time delay is considered, a precise synchronization effect may not be achieved, or even synchronization cannot be achieved. The estimation precision of a relative frequency offset directly influences the performance of consensus-based clock synchronization. Therefore, RoATS, LSTS, NMTS and other consensus-based synchronization mechanisms improve a relative frequency offset estimation method to cope with the influence of time delay on a synchronization effect. Although bounded communication time delay is considered in these synchronization methods, no optimization is performed for distribution characteristics of the time delay.

At present, a clock synchronization mechanism in the wireless sensor network mainly has following problems: firstly, an existing consensus-based clock synchronization mechanism under time delay only considers bounded time delay but does not respectively consider a fixed part and a random part of time delay, causing inaccurate relative frequency offset estimation and limiting synchronization performance; secondly, no optimization is performed for a specific random time delay distribution type in consensus-based clock synchronization, while exponential random time delay conforms to accumulated link delay during point-to-point assumed reference linking, consensus-based synchronization under truncated exponential time delay has practical significance.

Therefore, there is an urgent need for a frequency offset estimation method which can make a network achieve accurate clock synchronization.

DISCLOSURE OF THE INVENTION

In view of this, the purpose of the present invention is to provide a frequency offset estimation method for average consensus-based clock synchronization. Aiming at a problem that a consensus-based clock synchronization mechanism cannot effectively converge when communication time delay exists, concentrating on fixed time delay and truncated exponential random time delay, and considering a distributed feature of a wireless sensor network, parameters of logic clocks of nodes are updated in combination with a consensus-based method, so that the network achieves an accurate clock synchronization.

To achieve the above purpose, the present invention provides following technical solution:

A frequency offset estimation method for average consensus-based clock synchronization, comprising: estimating a relative frequency offset between nodes by using a maximum likelihood estimation method, and realizing clock synchronization between nodes based on an average consensus-based clock synchronization method, so that logic clocks of the nodes in a network achieve a common global clock, including following specific steps:

S1: assuming that each node i in the network periodically broadcasts a local clock message τ_(i)(t_(l) ^(i)), receiving, by a neighbor node j thereof, the clock message, recording a current local clock τ_(j)(t_(l) ^(id)) of the neighbor node, so the neighbor node establishes a relative clock relationship according to known local clock information and time delay due to influence of fixed time delay d_(ij) ^(f) and random time delay d_(ij) ^(r)(t_(l) ^(i)) existing in a data packet transmission process:

τ_(j)(t _(l) ^(id))=ω_(ij)τ_(i)(t _(l) ^(i))+φ_(ij) +d _(ij) ^(f) +d _(ij) ^(r)(t _(l) ^(i))

where ω_(ij) and φ_(ij) respectively represent a relative frequency offset and a relative phase offset of the node i with respect to the node j, d_(ij) ^(r)(t_(l) ^(i)) represents random communication time delay satisfying truncated exponential distribution of which an average value is λ and an upper limit is D; d_(ij) ^(f) represents fixed time delay existing in the data packet transmission process;

S2: performing relative frequency offset estimation according to the relative clock relationship after the neighbor node j receives synchronization messages each cycle, wherein when the node j receives L synchronization messages from the node i, the relative frequency offset ω_(ij) between nodes is estimated using a maximum likelihood estimation method:

${{\hat{\omega}}_{ij} = {\underset{\omega_{ij},\theta_{ij}}{argmax}{\exp\left( {{L\theta_{ij}} + {\omega_{ij}{\sum\limits_{l = 1}^{L}{\tau_{i}\left( t_{l}^{i} \right)}}}} \right)}}},\left\{ \begin{matrix} {0 < {{\tau_{j}\left( t_{1}^{id} \right)} - \theta_{ij} - {\omega_{ij}{\tau_{i}\left( t_{1}^{i} \right)}}} \leq D} \\ {0 < {{\tau_{j}\left( t_{2}^{id} \right)} - \theta_{ij} - {\omega_{ij}\tau_{i}\left( t_{2}^{i} \right)}} \leq D} \\ M \\ {0 < {{\tau_{j}\left( t_{L}^{id} \right)} - \theta_{ij} - {\omega_{ij}\tau_{i}\left( t_{L}^{i} \right)}} \leq D} \end{matrix} \right.$

where θ_(ij)=φ_(ij)+d_(ij) ^(f).

Further, in step S2, nodes in the network periodically broadcast clock synchronization messages, a number of local clocks of the broadcast nodes is an integral multiple of a broadcast cycle T, so solving of the relative frequency offset ω_(ij) under maximum likelihood estimation is converted into a linear optimization problem:

${{\max z} = {\theta_{ij} + {\frac{L + 1}{2}T\omega_{ij}}}},\left\{ {\begin{matrix} {0 < {{\tau_{j}\left( t_{1}^{id} \right)} - \theta_{ij} - {T\omega_{ij}}} \leq D} \\ {0 < {{\tau_{j}\left( t_{2}^{id} \right)} - \theta_{ij} - {2T\omega_{ij}}} \leq D} \\ M \\ {0 < {{\tau_{j}\left( t_{L}^{id} \right)} - \theta_{ij} - {{LT}\omega_{ij}}} \leq D} \end{matrix}.} \right.$

Further, the estimation problem solving of the relative frequency offset under the maximum likelihood estimation method is simplified to a linear objective function with linear constraints, a feasible region of the objective function is a common region under constraint line ω_(ij)=(τ_(j)(t_(l) ^(id))−θ_(ij))/lT and above constraint line ω_(ij)=(τ_(j)(t_(l) ^(id))−D−θ_(ij))/lT, the two clusters of constraint lines being formed according to a truncated boundary of time delay, an optimal value is located on a vertex of a feasible region boundary; by comparing intersection points of the constraint lines, only information of vertexes on the boundary is stored using an iterative method so as to reduce storage overhead, specifically including following steps:

S21: calculating an upper boundary B1 of the feasible region and vertexes thereof; assuming that an upper boundary of the feasible region surrounded by L constraint lines ω_(ij)=(τ_(j)(t_(l) ^(id))−θ_(ij))/lT has P vertexes, when the node j receives a (L+1)^(th) synchronization packet from i, generating a new constraint line ω_(ij)=(τ_(j)(t_(L+1) ^(id))−θ_(ij))/(L+1)T, comparing the new constraint line with the P vertexes on the original boundary B1, obtaining new upper boundary vertexes;

S22: calculating a lower boundary B2 of the feasible region and vertexes thereof, similar to S21, when the node j receives a (L+1)^(th) synchronization packet from i, generating a new constraint line ω_(ij)=(τ_(j)(t_(L+1) ^(id))−D−θ_(ij))/(L+1)T, comparing the new constraint line with the Q vertexes on the original lower boundary B2, obtaining new lower boundary vertexes;

S23: comparing the upper boundary vertexes with the lower boundary vertexes, obtaining available boundary vertexes, and new B1, B2 corresponding thereto, and substituting values of the boundary vertexes into an objective function z, so ω_(ij) corresponding to a vertex in the case where the objective function z is maximum is a relative frequency offset value under iterative maximum likelihood estimation.

Further, in step S21, obtaining new upper boundary vertexes specifically comprises: first, checking whether

${{- \frac{\theta_{ij}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{j} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{ij}\_ 1}^{u}$

is true when θ_(ij)=θ_(ij_min), where θ_(ij_min) represents a priori minimum value of θ_(ij); if not, ignoring the new constraint line; if so, checking whether

${{- \frac{\theta_{ij}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{j} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{ij}\_ p}^{u}$

is true when p=2, L P, θ_(ij)=θ_(ij_p) ^(u), where θ_(ij_p) ^(u) and ω_(ij_p) ^(u) respectively represent abscissa and ordinate values of a p^(th) vertex of the upper boundary B1; if all cases are true, constructing a new boundary B1 by the new constraint line, boundary vertexes being

${{c_{1}^{u} = \left( {\theta_{ij\_\min},{{- \frac{\theta_{ij\_\min},}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \right)},{{c_{2}^{u} = \left( {\theta_{ij\_\max},{{- \frac{\theta_{ij\_\max}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \right)};}}{{{if} - \frac{\theta_{{ij}\_ p}^{u}}{\tau_{i}\left( t_{L}^{i} \right)} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{ij}\_ p}^{u}}$

is not true when p≥

, the new constraint line intersects a connecting line between a (

−1)^(th) vertex and a

^(th) vertex of the original boundary B1, coordinates (θ_(ij_x) ^(u),ω_(ij_x) ^(u)) of an intersection point satisfying:

$\left\{ {\begin{matrix} {\omega_{{ij}\_ x}^{u} = {{\frac{\theta_{{ij}\_ x}^{u} - \theta_{{ij}\_\%}^{u}}{\theta_{{{ij}\_\%} - 1}^{u} - \theta_{{ij}\_\%}^{u}}\left( {\omega_{{{ij}\_\%} - 1}^{u} - \omega_{{ij}\_\%}^{u}} \right)} + \omega_{{ij}\_\%}^{u}}} \\ {\omega_{{ij}\_ x}^{u} = {\frac{\theta_{{ij}\_ x}^{u}}{\tau_{i}\left( t_{L}^{i} \right)} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \end{matrix};} \right.$

the new boundary B1 has P−

+3 vertexes, where

${c_{1}^{u} = \left( {\theta_{ij\_\min},{{- \frac{\theta_{ij\_\min}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \right)},{c_{2}^{u} = \left( {\theta_{ij\_ x}^{u}\omega_{ij\_ x}^{u}} \right)}$

replace the first

−1 vertexes of the original boundary B1.

The present invention has following advantageous effects:

1) Compared with an existing consensus-based clock synchronization mechanism under bounded time delay, the present invention has the advantages that distribution characteristics of communication time delay between nodes in the wireless sensor network are fully considered, not only considering fixed time delay, but also considering exponential distribution random time delay, and the maximum likelihood estimation method is applied to a frequency offset estimation process, making the estimated relative frequency offset more accurate, thus effectively improving consensus-based clock synchronization performance.

2) Compared with a common clock synchronization protocol under exponential time delay, the present invention has the advantages that bounded characteristics of time delay are considered, for truncated exponential random time delay, according to boundary constraints of the time delay, in the frequency offset estimation process, a characteristic that distributed nodes periodically broadcast clock synchronization messages is fully utilized, solving of maximum likelihood estimation is converted into a simpler linear objective function optimization problem, and an iterative comparison method is designed, so that the nodes can obtain frequency offset estimation values without storing all received clock information, thereby reducing storage overheads of the nodes.

3) A clock exchange mode of the present invention is based on unidirectional broadcast, there is no need to specify any reference node, each node in the fully distributed network executes a same clock synchronization algorithm, so there is no need to design separately for individual nodes, having good robustness and extendibility.

Other advantages, objectives and features of the present invention will be illustrated in the following description to some extent, and will be apparent to those skilled in the art based on the following investigation and research to some extent, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description.

DESCRIPTION OF THE DRAWINGS

To enable the purpose, the technical solution and the advantages of the present invention to be more clear, the present invention will be preferably described in detail below in combination with the drawings, wherein:

FIG. 1 is a diagram showing a communication topology of a fully distributed network;

FIG. 2 is a schematic diagram of a synchronization clock information exchange mechanism between nodes;

FIG. 3 is a schematic diagram showing linear programming of the frequency offset estimation method of the present invention;

FIG. 4 is a flow chart of the frequency offset estimation method of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the present invention are described below through specific embodiments. Those skilled in the art can understand other advantages and effects of the present invention easily through the disclosure of the description. The present invention can also be implemented or applied through additional different specific embodiments. All details in the description can be modified or changed based on different perspectives and applications without departing from the spirit of the present invention. It should be noted that the figures provided in the following embodiments only exemplarily explain the basic conception of the present invention, and if there is no conflict, the following embodiments and the features in the embodiments can be mutually combined.

Referring to FIGS. 1-4, FIG. 1 is a diagram showing a communication topology of a distributed network used in the present invention. As shown in FIG. 1, nodes are randomly distributed in a network, wherein each node broadcasts local clock messages thereof and receives information about other nodes within a communication range thereof. A communication exchange topology of the wireless sensor network may be modeled as a strongly connected graph G=(N,E), where N={1, 2, L, n} represents a set of nodes in the network, E represents a set of reliable communication links, for example, (i,j)∈E represents that a node j can successfully receive information from a node i. A neighbor node of the node i is represented as N_(i)={j∈N:(i,j)∈E}.

A synchronization clock information exchange mechanism between nodes is shown in FIG. 2, taking two nodes as an example, the node i broadcasts local clock information τ_(i)(t_(l) ^(i)) over a cycle T, the neighbor node j of the node receives clock messages and records a current local clock τ_(i)(t_(l) ^(id)) thereof. The neighbor node establishes a relative clock relationship according to known local clock information and time delay due to influence of fixed time delay d_(ij) ^(f) and random time delay d_(ij) ^(r)(t_(l) ^(i)) existing in a data packet transmission process,

τ_(j)(t _(l) ^(id))=ω_(ij)τ_(i)(t _(l) ^(i))+ω_(ij) +d _(ij) ^(f) +d _(ij) ^(r)(t _(l) ^(i))

where ω_(ij) and φ_(ij) respectively represent a relative frequency offset and a relative phase offset of the node i with respect to node j, d_(ij) ^(r) represents communication time delay satisfying truncated exponential distribution.

After receiving synchronization messages, according to the relative clock relationship, the neighbor node j obtains:

d _(ij) ^(r)(t _(l) ^(i))=τ_(j)(t _(l) ^(id))−ω_(ij)τ_(i)(t _(l) ^(i))−φ_(ij) −d _(ij) ^(f)  (1)

When the node j receives L synchronization messages from the node i, because the random delay are mutually independent truncated exponential distribution variables, a joint probability density function of the random time delay d_(ij) ^(r) is:

$\begin{matrix} {{{f_{d}\left( d_{ij}^{r} \right)} = {\prod\limits_{l = 1}^{L}\frac{\lambda{\exp\left( {{- \lambda}{d_{ij}^{r}\left( t_{l}^{i} \right)}} \right)}}{1 - {\exp\left( {{- \lambda}D} \right)}}}},\left\{ \begin{matrix} {0 \leq {d_{ij}^{r}\left( t_{1}^{i} \right)} \leq D} \\ {0 \leq {d_{ij}^{r}\left( t_{2}^{i} \right)} \leq D} \\ M \\ {0 \leq {d_{ij}^{r}\left( t_{L}^{i} \right)} \leq D} \end{matrix} \right.} & (2) \end{matrix}$

(1) is substituted into (2), obtaining a likelihood function with respect to the known local clocks and the parameters to be estimated:

$\begin{matrix} {{{f_{\tau_{j}}\left( \tau_{j} \right)} = {\frac{\lambda^{L}}{\left( {1 - {\exp\left( {{- \lambda}D} \right)}} \right)^{L}}{\exp\left( {- {\lambda\left( {{\sum\limits_{l = 1}^{L}{\tau_{j}\left( t_{l}^{id} \right)}} - {L\theta_{ij}} - {\omega_{ij}{\sum\limits_{l = 1}^{L}{\tau_{i}\ \left( t_{l}^{i} \right)}}}} \right)}} \right)}}}\left\{ \begin{matrix} {0 < {{\tau_{j}\left( t_{1}^{id} \right)} - \theta_{ij} - {\omega_{ij}{\tau_{i}\left( t_{1}^{i} \right)}}} \leq D} \\ {0 < {{\tau_{j}\left( t_{2}^{id} \right)} - \theta_{ij} - {\omega_{ij}\tau_{i}\left( t_{2}^{i} \right)}} \leq D} \\ M \\ {0 < {{\tau_{j}\left( t_{L}^{id} \right)} - \theta_{ij} - {\omega_{ij}\tau_{i}\left( t_{L}^{i} \right)}} \leq D} \end{matrix} \right.} & (3) \end{matrix}$

where θ_(ij)=φ_(ij)+d_(ij) ^(f). The maximum likelihood estimation is to find parameters under the condition of satisfying the constraints so that equation (3) is maximized, that is,

$\exp\left( {- {\lambda\left( {{\sum\limits_{l = 1}^{L}{\tau_{j}\left( t_{l}^{id} \right)}} - {L\theta_{ij}} - {\omega_{ij}{\sum\limits_{l = 1}^{L}{\tau_{i}\left( t_{l}^{i} \right)}}}} \right)}} \right)$

is maximized. Under the maximum likelihood estimation method, the relative frequency offset ω_(ij) between nodes is:

$\begin{matrix} {{{\overset{\hat{}}{\omega}}_{ij} = {\underset{\omega_{ij},\theta_{ij}}{\arg\max}{\exp\left( {{L\theta}_{ij} + {\omega_{ij}{\sum\limits_{l = 1}^{L}{\tau_{i}\left( t_{l}^{i} \right)}}}} \right)}}},} & (4) \end{matrix}$ $\left\{ \begin{matrix} {0 \leq {{\tau_{j}\left( t_{1}^{id} \right)} - \theta_{ij} - {\omega_{ij}\tau_{i}\left( t_{1}^{i} \right)}} \leq D} \\ {0 \leq {{\tau_{j}\left( t_{2}^{id} \right)} - \theta_{ij} - {\omega_{ij}\tau_{i}\left( t_{2}^{i} \right)}} \leq D} \\ M \\ {0 \leq {{\tau_{j}\left( t_{L}^{id} \right)} - \theta_{ij} - {\omega_{ij}\tau_{i}\left( t_{L}^{i} \right)}} \leq D} \end{matrix} \right.$

Nodes periodically broadcast clock synchronization messages, so a number of local clocks of the broadcast nodes is an integral multiple of a broadcast cycle T, i.e. τ_(i)(t_(l) ^(i))=lT. Thus, solving of the relative frequency offset ω_(ij) under maximum likelihood estimation may be converted into an optimization problem:

$\begin{matrix} {{{\max z} = {\theta_{ij} + {\frac{L + 1}{2}{T\omega}_{ij}}}},} & (5) \end{matrix}$ $\left\{ \begin{matrix} {0 < {{\tau_{j}\left( t_{1}^{id} \right)} - \theta_{ij} - {T\omega}_{ij}} \leq D} \\ {0 < {{\tau_{j}\left( t_{2}^{id} \right)} - \theta_{ij} - {2{T\omega}_{ij}}} \leq D} \\ M \\ {0 < {{\tau_{j}\left( t_{L}^{id} \right)} - \theta_{ij} - {{LT}\omega}_{ij}} \leq D} \end{matrix} \right.$

The estimation problem of the relative frequency offset under the maximum likelihood estimation method is a maximum value problem of a linear objective function with linear constraints, a feasible region of the objective function is a common region under constraint lines ω_(ij)=(τ_(j)(t_(l) ^(id))−θ_(ij))/lT and above constraint lines ω_(ij)=(τ_(j) (t_(l) ^(id))−D−θ_(ij))/lT. Therefore, with the increase of the number of synchronization information packets, the number of constraint lines is increased, and more information is required to be stored by the neighbor node. However, as shown in FIG. 3, not every constraint line is useful for constructing the feasible region, so there is a need to construct an efficient algorithm to simplify estimation solving and reduce storage overhead. Because this is a linear objective function with linear constraints, an optimal value must be located at a vertex of a boundary of the feasible region. Thus, by comparing intersection points of the constraint lines, only information of vertexes on the boundary is stored using an iterative method so as to reduce storage overhead, specifically including following steps:

Step 1: Discussing an upper boundary B1 of the feasible region and vertexes thereof; assuming that an upper boundary of the feasible region surrounded by L constraint lines ω_(ij)=(τ_(j)(t_(l) ^(id))−θ_(ij))/lT has P vertexes, when the node j receives a (L+1)^(th) synchronization packet from i, generating a new constraint line ω_(ij)=(τ_(j)(t_(L+1) ^(id))−θ_(ij))/(L+1)T. First, checking whether

${{- \frac{\theta_{ij}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{{ij}\_}1}^{u}$

is true when θ_(ij)=θ_(ij_min). If not, ignoring this constraint line, because the feasible region is located below all constraint lines

$\omega_{ij} = {{- \frac{\theta_{ij}}{\tau_{i}\left( t_{l}^{i} \right)}} + \frac{\tau_{j}\left( t_{l}^{id} \right)}{\tau_{i}\left( t_{l}^{i} \right)}}$

and an absolute value of a slope of the new constraint line is smaller and smaller, if so, checking whether

${{- \frac{\theta_{ij}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{ij}\_ p}^{u}$

is true when p=2, L P, θ_(ij)=θ_(ij_p) ^(u). If all cases are true, constructing a new boundary B1 by the new constraint line, boundary vertexes being

${c_{1}^{u} = \left( {\theta_{{ij}\_\min},{{- \frac{\theta_{{ij}\_\min}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \right)},$ $c_{2}^{u} = {\left( {\theta_{{ij}\_\max} - \frac{\theta_{{ij}\_\max}}{\tau_{i}\left( t_{L}^{i} \right)} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} \right).}$ ${{If} - \frac{\theta_{{ij}\_ p}^{u}}{\tau_{i}\left( t_{L}^{i} \right)} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{ij}\_ p}^{u}$

is not true when p≥

, the new constraint line intersects a connecting line between a (

−1)^(th) vertex and a

^(th) vertex of the original boundary B1, coordinates (θ_(ij_x) ^(u),ω_(ij_x) ^(u)) of an intersection point satisfying:

$\left\{ \begin{matrix} {\omega_{{ij}\_ x}^{u} = {{\frac{\theta_{{ij}\_ x}^{u} - {\theta\text{?}}}{{\theta\text{?}} - {\theta\text{?}}}\left( {{\omega\text{?}} - {\omega\text{?}}} \right)} + {\omega\text{?}}}} \\ {\theta_{{ij}\_ x}^{u} = {{- \frac{\theta_{{ij}\_ x}^{u}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \end{matrix} \right.$ ?indicates text missing or illegible when filed

the new boundary B1 has P−

++3 vertexes, where

${c_{1}^{u} = \left( {\theta_{{ij}\_\min},{{- \frac{\theta_{{ij}\_\min}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \right)},{c_{2}^{u} = \left( {\theta_{{ij}\_ x}^{u},\omega_{{ij}\_ x}^{u}} \right)}$

replace the first

−1 vertexes of the original boundary B1.

S22: Discussing a lower boundary B2 of the feasible region and vertexes thereof, similar to Step 1, when the node j receives a (L+1)^(th) synchronization packet from i, generating a new constraint line ω_(ij)=(τ_(j)(t_(L+1) ^(id))−D−θ_(ij))/(L+1)T, comparing the new constraint line with the Q vertexes on the original lower boundary B2, obtaining new lower boundary vertexes.

Step 3: forming a boundary of the feasible region by a common region between the boundary B1 and the boundary B2, comparing vertexes on B1 with vertexes on B2 in combination with a relative position relationship between B1 and B2, obtaining available boundary vertexes.

After analyzing all influence of the new constraint line on the feasible region and obtaining the new boundary vertexes of the feasible region, coordinate values of the new boundary vertexes are substituted into an objective function z=θ_(ij)+(L+1)Tω_(ij)/2, so ω_(ij) corresponding to a vertex in the case where z is maximum is a relative frequency offset value under iterative maximum likelihood estimation. The estimated relative frequency offset may be used in subsequent logic clock compensation.

Embodiments

FIG. 4 is a flow chart of the frequency offset estimation method for average consensus-based clock synchronization of the present invention. This embodiment provides a maximum likelihood estimation-based relative frequency offset estimation method for average consensus-based synchronization, as shown in the figure, specifically comprising following steps:

V1: starting a synchronization process.

V2-V4: Initializing message broadcast cycles, determining, by a node, whether a broadcast condition is met, if so, broadcasting clock synchronization messages, otherwise waiting until the condition is met.

V5-V6: Receiving and recording, by a neighbor node, a local clock thereof, analyzing a relative clock relationship between nodes.

V7-V10: Performing, by the neighbor node, maximum likelihood estimation of a relative frequency offset according to a new clock relationship, updating a likelihood function, that is, updating the objective function and constraints, and comparing same with existing boundary position information to update the feasible region.

V11: Comparing vertex values of the feasible region, obtaining a relative frequency offset under maximum likelihood estimation.

V12: Performing clock parameter compensation using an average consensus-based synchronization method.

V13-V14: Judging whether a synchronization termination condition is met, ending if synchronization is achieved, otherwise, monitoring clock information, updating estimation, compensation and other operations, until the synchronization termination condition is met.

Finally, it should be noted that the above embodiments are only used for describing, rather than limiting the technical solution of the present invention. Although the present invention is described in detail with reference to the preferred embodiments, those ordinary skilled in the art shall understand that the technical solution of the present invention can be amended or equivalently replaced without departing from the purpose and the scope of the technical solution. The amendment or equivalent replacement shall be covered within the scope of the claims of the present invention. 

1. A frequency offset estimation method for average consensus-based clock synchronization, specifically comprising following steps: S1: assuming that each node i in a network periodically broadcasts a local clock message τ_(i)(t_(l) ^(i)), receiving, by a neighbor node j thereof, the clock message, recording a current local clock τ_(j)(t_(l) ^(id)) of the neighbor node, so the neighbor node establishes a relative clock relationship according to known local clock information and time delay: τ_(j)(t _(l) ^(id))=ω_(ij)τ_(i)(t _(l) ^(i))+φ_(ij) +d _(ij) ^(f) +d _(ij) ^(r)(t _(l) ^(i)) where ω_(ij) and φ_(ij) respectively represent a relative frequency offset and a relative phase offset of the node i with respect to the node j, d_(ij) ^(r)(t_(l) ^(i)) represents random communication time delay satisfying truncated exponential distribution of which an average value is λ and an upper limit is D; d_(ij) ^(f) represents fixed time delay existing in a data packet transmission process; S2: performing relative frequency offset estimation according to the relative clock relationship after the neighbor node j receives synchronization messages each cycle, wherein when the node j receives L synchronization messages from the node i, the relative frequency offset ω_(ij) between nodes is estimated using a maximum likelihood estimation method: ${{\max z} = {\underset{\omega_{ij},\theta_{ij}}{\arg\max}\exp\left( {{L\theta}_{ij} + {\omega_{ij}{\sum\limits_{l = 1}^{L}{\tau_{i}\left( t_{l}^{i} \right)}}}} \right)}},\left\{ \begin{matrix} {0 < {{\tau_{j}\left( t_{1}^{id} \right)} - \theta_{ij} - {\omega_{ij}{\tau_{i}\left( t_{1}^{i} \right)}}} \leq D} \\ {0 < {{\tau_{j}\left( t_{2}^{id} \right)} - \theta_{ij} - {\omega_{ij}{\tau_{i}\left( t_{2}^{i} \right)}}} \leq D} \\ {M} \\ {0 < {{\tau_{j}\left( t_{L}^{id} \right)} - \theta_{ij} - {\omega_{ij}{\tau_{i}\left( t_{L}^{i} \right)}}} \leq D} \end{matrix} \right.$ where θ_(ij)=φ_(ij)+d_(ij) ^(f).
 2. The frequency offset estimation method for average consensus-based clock synchronization according to claim 1, characterized in that: in step S2, nodes in the network periodically broadcast clock synchronization messages, a number of local clocks of the broadcast nodes is an integral multiple of a broadcast cycle T so solving of the relative frequency offset ω_(ij) under maximum likelihood estimation is converted into a linear optimization problem: ${{\max z} = {\theta_{ij} + {\frac{L + 1}{2}{T\omega}_{ij}}}},\left\{ {\begin{matrix} {0 < {{\tau_{j}\left( t_{1}^{id} \right)} - \theta_{ij} - {T\omega}_{ij}} \leq D} \\ {0 < {{\tau_{j}\left( t_{2}^{id} \right)} - \theta_{ij} - {2{T\omega}_{ij}}} \leq D} \\ {M} \\ {0 < {{\tau_{j}\left( t_{L}^{id} \right)} - \theta_{ij} - {{LT}\omega}_{ij}} \leq D} \end{matrix}.} \right.$
 3. The frequency offset estimation method for average consensus-based clock synchronization according to claim 2, characterized in that: the estimation problem solving of the relative frequency offset under the maximum likelihood estimation method is simplified to a linear objective function with linear constraints, a feasible region of the objective function is a common region under constraint line ω_(ij)=(τ_(j)(t_(l) ^(id))−θ_(ij))/lT and above constraint line ω_(ij)=(τ_(j)(t_(l) ^(id))−D−θ_(ij))/lT, the two cluster of constraint lines being formed according to a truncated boundary of time delay, an optimal value is located on a vertex of a feasible region boundary; by comparing intersection points of the constraint lines, only information of vertexes on the boundary is stored using an iterative method so as to reduce storage overhead, specifically including following steps: S21: calculating an upper boundary B1 of the feasible region and vertexes thereof; assuming that an upper boundary of the feasible region surrounded by L constraint lines ω_(ij)=(τ_(j)(t_(l) ^(id))−θ_(ij))/lT has P vertexes, when the node j receives a (L+1)^(th) synchronization packet from i, generating a new constraint line ω_(ij)=(τ_(j)(t_(L+1) ^(id))−θ_(ij))/(L+1)T, comparing the new constraint line with the P vertexes on the original boundary B1, obtaining new upper boundary vertexes; S22: calculating a lower boundary B2 of the feasible region and vertexes thereof, similar to S21, when the node j receives a (L+1)^(th) synchronization packet from i, generating a new constraint line ω_(ij)=(τ_(j)(t_(L+1) ^(id))−D−θ_(ij))/(L+1)T, comparing the new constraint line with the Q vertexes on the original lower boundary B2, obtaining new lower boundary vertexes; S23: comparing the upper boundary vertexes with the lower boundary vertexes, obtaining available boundary vertexes, and new B1, B2 corresponding thereto, and substituting values of the boundary vertexes into an objective function z, so ω_(ij) corresponding to a vertex in the case where the objective function z is maximum is a relative frequency offset value under iterative maximum likelihood estimation.
 4. The frequency offset estimation method for average consensus-based clock synchronization according to claim 3, characterized in that: in step S21, obtaining new upper boundary vertexes specifically comprises: first, checking whether ${{- \frac{\theta_{ij}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{j} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{{ij}\_}1}^{u}$ is true when θ_(ij)=θ_(ij_min), where θ_(ij_min) represents a priori minimum value of θ_(ij); if not, ignoring new constraint line; if so, checking whether ${{- \frac{\theta_{ij}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{ij}\_ p}^{u}$ is true when p=2, L P, θ_(ij)=θ_(ij_p) ^(u), where θ_(ij_p) ^(u) and ω_(ij_p) ^(u) respectively represent abscissa and ordinate values of a p^(th) vertex of the upper boundary B1; if all cases are true, constructing a new boundary B1 by the new constraint line, boundary vertexes being ${{c_{1}^{u} = \left( {\theta_{{ij}\_\min},{{- \frac{\theta_{{ij}\_\min}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \right)},{{c_{2}^{u} = \left( {\theta_{{ij}\_\max} - \frac{\theta_{{ij}\_\max}}{\tau_{i}\left( t_{L}^{i} \right)} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} \right)};}}{{{If} - \frac{\theta_{{ij}\_ p}^{u}}{\tau_{i}\left( t_{L}^{i} \right)} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}} < \omega_{{ij}\_ p}^{u}}$ is not true when p≥

, the new constraint line intersects a connecting line between a (

−1)^(th) vertex and a

^(th) vertex of the original boundary B1, coordinates (θ_(ij_x) ^(u),ω_(ij_x) ^(u)) of an intersection point satisfying: $\left\{ {\begin{matrix} {\omega_{{ij}\_ x}^{u} = {{\frac{\theta_{{ij}\_ x}^{u} - {\theta\text{?}}}{{\theta\text{?}} - {\theta\text{?}}}\left( {{\omega\text{?}} - {\omega\text{?}}} \right)} + {\omega\text{?}}}} \\ {\omega_{{ij}\_ x}^{u} = {{- \frac{\theta_{{ij}\_ x}^{u}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \end{matrix};} \right.$ ?indicates text missing or illegible when filed the new boundary B1 has P−

+3 vertexes, where ${c_{1}^{u} = \left( {\theta_{{ij}\_\min},{{- \frac{\theta_{{ij}\_\min}}{\tau_{i}\left( t_{L}^{i} \right)}} + \frac{\tau_{j}\left( t_{L}^{id} \right)}{\tau_{i}\left( t_{L}^{i} \right)}}} \right)},{c_{2}^{u} = \left( {\theta_{{ij}\_ x}^{u},\omega_{{ij}\_ x}^{u}} \right)}$ replace the first

−1 vertexes of the original boundary B1. 